package com.yonyou.pmclouds.projectpart.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.yonyou.pmclouds.ApplicationConsts;
import com.yonyou.pmclouds.basecom.exception.BusinessException;
import com.yonyou.pmclouds.projectpart.upgrade.service.IProjectPartUpgrade;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author th
 * @date 2020/4/21 10:35
 */
@RequestMapping("/outter/projectpart")
@RestController
public class ProjectPartUpgradeController {
    @Reference(version = ApplicationConsts.APPLICATION_VERSION)
    private IProjectPartUpgrade upgradeService;

    /**
     * 业务单据工程部位升级
     *
     * @return
     * @throws BusinessException
     */
    @GetMapping("/upgrade")
    public boolean upgrade() throws BusinessException {
        return upgradeService.upgrade();
    }
}
